home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Apple Shared Library Manager / CodeWarrior Read Me! < prev    next >
Encoding:
Text File  |  1996-11-19  |  3.7 KB  |  50 lines  |  [ttro/ttxt]

  1. ASLM CodeWarrior Support Release Notes
  2.  
  3. A few improvements and fixes have been made to make writing ASLM clients from CodeWarrior easier. You still cannot build ASLM shared libraries from CodeWarrior. To build ASLM clients from CodeWarrior, it is necessary for 68k clients to enable the 4 byte ints and MPW C calling conventions options from the 68K Processor preferences panel. 68K clients should link with the libraries in the THINKLibraries folder and PPC clients should link with the libraries in the MrCLibraries folder.
  4.  
  5. FlushCache Link Error Fixed
  6. -------------------------
  7.  
  8. The FlushCache routine, which was accidently ommited from LibraryManagerClient.o, has been added so you won't get link errors any more.
  9.  
  10. Inspector Example Builds from CodeWarrior
  11. ---------------------------------------
  12.  
  13. A couple of minor changes have been made to the Inspector example so the application will now build under CodeWarrior. To get the Inspector application to build you will need to do the following:
  14.  
  15. •Create a standard PPC or 68k C++ project.
  16. •Add the ASLM CInterfaces folder as an Access Path and enable the 'Treat #include <…> as #include "…"' option.
  17. •For 68k, from the 68K Processor preferences panel, enable 4 byte ints and MPW C calling conventions.
  18. •Add InspectorMain.cp to the project.
  19. •For 68k, add LibraryManagerClient.o from the THINKLibraries folder.
  20. •For PPC, add LibraryManagerPPC.o from the MrCLibraries folder.
  21. •Add InspectorLibrary.cl.o to the project. Note that you will first need to build the InspectorLibrary from MPW in order to create this file. (You can't build ASLM shared libraries from CodeWarrior).
  22. •Add the Inspector resources to the project. You will need to create an Inspector.RSRC file first. The easiest way to do this is to first build the Inspector or InspectorPPC application from MPW. Then open up the application from ResEdit and delete any 'CODE' and 'cfrg' resources, save the file as Inspector.RSRC, and add it to the project.
  23.  
  24. LibraryManager.h Supports SingleObject for CodeWarrior
  25. --------------------------------------------------
  26.  
  27. LibraryManager.h has been changed to recognize the fact the CodeWarrior supports SingleObject. Clients developed in CodeWarrior will now generate vtable compatible references to any ASLM class that inherits from TDyamic or uses the SINGLEOBJECT macro.
  28.  
  29. Improved CodeWarrior Mangled Name Support
  30. ----------------------------------------
  31.  
  32. The LibraryBuilder tool has changed so it will now generate both MPW and CodeWarrior compatible mangled names. The CodeWarrior compatible mangled names will be generated automatically. You don't need to specify any options. This will help get ride of most of the link errors you get when trying to use a C++ class exported from an ASLM shared library.
  33.  
  34. Note that the LibraryBuilder tool will not generate proper CodeWarrior mangled names for all C++ functions. MrC, SCpp, and CFront all use the letter T in a mangled name to represent a parameter whose type is the same as the previous parameter. CodeWarrior does not use this shorthand notation and LibraryBuilder does not properly convert these names. For example:
  35.  
  36. void Foo(TRect*, void*, TRect*);
  37.  
  38. would be mangled as
  39.  
  40. void Foo__FP5TRectPvT2
  41.  
  42. Foo__F is for the function name, P5TRect is a pointer to a TRect, Pv is a pointer to a void, and T2 specifies that the parameter is the same as the first one - a pointer to a TRect. T2 is used because it is shorter then repeating P5TRect.
  43.  
  44. If you have a MrC, SCpp, or CFront mangled name that is using the letter T, then CodeWarrior clients will need to write glue code to use if. Using the Foo() example above, the glue would be as follows:
  45.  
  46. extern "C" void Foo__FP5TRectPvP5TRect(TRect* rect1, void* myvoid, TRect* rect2)
  47. {
  48.     Foo__FP5TRectPvT2(rect1, myvoid, rect2);
  49. }
  50.